import { defineStore } from 'pinia'

export const useStore = defineStore('storeId', {
  state: () => {
    return {
      counter: 10,
      name: 'tgrong',
      isAdmin: true
    }
  },
  getters: {
    counterPar() {
      return this.counter + 100;
    }
  },
  actions: {
    changeCounter(val) {
      this.counter += val;
    }
  },
  persist: {
    enabled: true,
    strategies: [
      {
        storage: localStorage
      }
    ]
  }
})